Previously, specifying a virtual device string the vbd that couldn't
be parsed would result in attempting to actually create the device
with vbd number -1 !
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
backend_type = device_disk_backend_type_of_phystype(disk->phystype);
devid = device_disk_dev_number(disk->virtpath);
+ if (devid==-1) {
+ XL_LOG(ctx, XL_LOG_ERROR, "Invalid or unuspported"
+ " virtual disk identifier %s", disk->virtpath);
+ return ERROR_INVAL;
+ }
device.backend_devid = devid;
device.backend_domid = disk->backend_domid;